package com.deere.model;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Inventory extends GenericModel {

	/*
	 * 零件图号
	 */
	private String partCode;
	/*
	 * 零件名称
	 */
	private String partName;
	private String partType;
	/*
	 * 零件仓库存放的位置
	 */
	private String address;
	/*
	 * 仓库中现有的数量
	 */
	private Integer quantity=0;
	
	@Id
	public String getPartCode() {
		return partCode;
	}

	public void setPartCode(String partCode) {
		this.partCode = partCode;
	}

	public String getPartName() {
		return partName;
	}

	public void setPartName(String partName) {
		this.partName = partName;
	}
	

	public String getPartType() {
		return partType;
	}

	public void setPartType(String partType) {
		this.partType = partType;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	
	
	public void addQuantity(Integer num){
		if(null != num)
			this.quantity=this.quantity+num;
	}
}
